﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Data.GameData.Utils
{
    public static class GameDataFactory
    {
        public static GameObject BuildGameObject(string objectType)
        {
            GameObject newObj = null;

            switch (objectType)
            {
                case "ShipClass":
                    newObj = new ShipClass();
                    break;
                case "WeaponSystem":
                    newObj = new WeaponSystem();
                    break;
                case "ShipSystem":
                    newObj = new ShipSystem();
                    break;
                default:
                    break;
            }

            if (newObj == null)
                throw new Exception("Unknown Data File Type.");

            return newObj;
        }
    }
}
